<!doctype html>
<meta charset="utf8">

<emu-clause id="sec-temporal-plaindatetime-objects">
  <h1>Temporal.PlainDateTime Objects</h1>
  <p>A Temporal.PlainDateTime object is an Object that contains integers corresponding to a particular year, month, day, hour, minute, second, millisecond, microsecond, and nanosecond.</p>

  <emu-clause id="sec-temporal-plaindatetime-constructor">
    <h1>The Temporal.PlainDateTime Constructor</h1>
    <p>The Temporal.PlainDateTime constructor:</p>
    <ul>
      <li>
        creates and initializes a new Temporal.PlainDateTime object when called as a constructor.
      </li>
      <li>
        is not intended to be called as a function and will throw an exception when called in that manner.
      </li>
      <li>
        may be used as the value of an `extends` clause of a class definition.
        Subclass constructors that intend to inherit the specified Temporal.PlainDateTime behaviour must
        include a super call to the %Temporal.PlainDateTime% constructor to create and initialize subclass
        instances with the necessary internal slots.
      </li>
    </ul>

    <emu-clause id="sec-temporal.plaindatetime">
      <h1>Temporal.PlainDateTime ( _isoYear_, _isoMonth_, _isoDay_ [ , _hour_ [ , _minute_ [ , _second_ [ , _millisecond_ [ , _microsecond_ [ , _nanosecond_ [ , _calendarLike_ ] ] ] ] ] ] ] )</h1>
      <p>
        When the `Temporal.PlainDateTime` function is called, the following steps are taken:
      </p>
      <emu-note>The value of ? ToIntegerOrInfinity(*undefined*) is 0.</emu-note>
      <emu-alg>
        1. If NewTarget is *undefined*, then
          1. Throw a *TypeError* exception.
        1. Let _isoYear_ be ? ToIntegerOrInfinity(_isoYear_).
        1. If _isoYear_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _isoMonth_ be ? ToIntegerOrInfinity(_isoMonth_).
        1. If _isoMonth_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _isoDay_ be ? ToIntegerOrInfinity(_isoDay_).
        1. If _isoDay_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _hour_ be ? ToIntegerOrInfinity(_hour_).
        1. If _hour_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _minute_ be ? ToIntegerOrInfinity(_minute_).
        1. If _minute_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _second_ be ? ToIntegerOrInfinity(_second_).
        1. If _second_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _millisecond_ be ? ToIntegerOrInfinity(_millisecond_).
        1. If _millisecond_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _microsecond_ be ? ToIntegerOrInfinity(_microsecond_).
        1. If _microsecond_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _nanosecond_ be ? ToIntegerOrInfinity(_nanosecond_).
        1. If _nanosecond_ is +∞ or -∞, throw a *RangeError* exception.
        1. Let _calendar_ be ? ToTemporalCalendarWithISODefault(_calendarLike_).
        1. Return ? CreateTemporalDateTime(_isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _calendar_, NewTarget).
      </emu-alg>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-the-temporal-plaindatetime-constructor">
    <h1>Properties of the Temporal.PlainDateTime Constructor</h1>
    <p>The value of the [[Prototype]] internal slot of the Temporal.PlainDateTime constructor is the intrinsic object %Function.prototype%.</p>
    <p>The Temporal.PlainDateTime constructor has the following properties:</p>

    <emu-clause id="sec-temporal-plaindatetime-prototype">
      <h1>Temporal.PlainDateTime.prototype</h1>
      <p>The initial value of `Temporal.PlainDateTime.prototype` is %Temporal.PlainDateTime.prototype%.</p>
      <p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.from">
      <h1>Temporal.PlainDateTime.from ( _item_ [ , _options_ ] )</h1>
      <p>
        The `from` method takes two arguments, _item_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. If Type(_item_) is Object and _item_ has an [[InitializedTemporalDateTime]] internal slot, then
          1. Perform ? ToTemporalOverflow(_options_).
          1. Return ? CreateTemporalDateTime(_item_.[[ISOYear]], _item_.[[ISOMonth]], _item_.[[ISODay]], _item_.[[ISOHour]], _item_.[[ISOMinute]], _item_.[[ISOSecond]], _item_.[[ISOMillisecond]], _item_.[[ISOMicrosecond]], _item_.[[ISONanosecond]], _item_.[[Calendar]]).
        1. Return ? ToTemporalDateTime(_item_, _options_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.compare">
      <h1>Temporal.PlainDateTime.compare ( _one_, _two_ )</h1>
      <p>
        The `compare` method takes two arguments, _one_ and _two_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Set _one_ to ? ToTemporalDateTime(_one_).
        1. Set _two_ to ? ToTemporalDateTime(_two_).
        1. Return 𝔽(! CompareISODateTime(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _one_.[[ISOHour]], _one_.[[ISOMinute]], _one_.[[ISOSecond]], _one_.[[ISOMillisecond]], _one_.[[ISOMicrosecond]], _one_.[[ISONanosecond]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]], _two_.[[ISOHour]], _two_.[[ISOMinute]], _two_.[[ISOSecond]], _two_.[[ISOMillisecond]], _two_.[[ISOMicrosecond]], _two_.[[ISONanosecond]])).
      </emu-alg>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-the-temporal-plaindatetime-prototype-object">
    <h1>Properties of the Temporal.PlainDateTime Prototype Object</h1>

    <p>The Temporal.PlainDateTime prototype object</p>
    <ul>
      <li>is the intrinsic object <dfn>%Temporal.PlainDateTime.prototype%</dfn>.</li>
      <li>is itself an ordinary object.</li>
      <li>is not a Temporal.PlainDateTime instance and does not have a [[InitializedTemporalDateTime]] internal slot.</li>
      <li>has a [[Prototype]] internal slot whose value is %Object.prototype%.</li>
    </ul>

    <emu-clause id="sec-temporal.plaindatetime.prototype.constructor">
      <h1>Temporal.PlainDateTime.prototype.constructor</h1>
      <p>The initial value of `Temporal.PlainDateTime.prototype.constructor` is %Temporal.PlainDateTime%.</p>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype-@@tostringtag">
      <h1>Temporal.PlainDateTime.prototype[ @@toStringTag ]</h1>
      <p>
        The initial value of the @@toStringTag property is the string value *"Temporal.PlainDateTime"*.
      </p>
      <p>
        This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.
      </p>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.calendar">
      <h1>get Temporal.PlainDateTime.prototype.calendar</h1>
      <p>
        `Temporal.PlainDateTime.prototype.calendar` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return _dateTime_.[[Calendar]].
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.year">
      <h1>get Temporal.PlainDateTime.prototype.year</h1>
      <p>
        `Temporal.PlainDateTime.prototype.year` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.month">
      <h1>get Temporal.PlainDateTime.prototype.month</h1>
      <p>
        `Temporal.PlainDateTime.prototype.month` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarMonth(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.monthcode">
      <h1>get Temporal.PlainDateTime.prototype.monthCode</h1>
      <p>
        `Temporal.PlainDateTime.prototype.monthCode` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarMonthCode(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.day">
      <h1>get Temporal.PlainDateTime.prototype.day</h1>
      <p>
        `Temporal.PlainDateTime.prototype.day` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDay(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.hour">
      <h1>get Temporal.PlainDateTime.prototype.hour</h1>
      <p>
        `Temporal.PlainDateTime.prototype.hour` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISOHour]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.minute">
      <h1>get Temporal.PlainDateTime.prototype.minute</h1>
      <p>
        `Temporal.PlainDateTime.prototype.minute` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISOMinute]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.second">
      <h1>get Temporal.PlainDateTime.prototype.second</h1>
      <p>
        `Temporal.PlainDateTime.prototype.second` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISOSecond]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.millisecond">
      <h1>get Temporal.PlainDateTime.prototype.millisecond</h1>
      <p>
        `Temporal.PlainDateTime.prototype.millisecond` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISOMillisecond]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.microsecond">
      <h1>get Temporal.PlainDateTime.prototype.microsecond</h1>
      <p>
        `Temporal.PlainDateTime.prototype.microsecond` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISOMicrosecond]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.nanosecond">
      <h1>get Temporal.PlainDateTime.prototype.nanosecond</h1>
      <p>
        `Temporal.PlainDateTime.prototype.nanosecond` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return 𝔽(_dateTime_.[[ISONanosecond]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.dayofweek">
      <h1>get Temporal.PlainDateTime.prototype.dayOfWeek</h1>
      <p>
        `Temporal.PlainDateTime.prototype.dayOfWeek` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDayOfWeek(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.dayofyear">
      <h1>get Temporal.PlainDateTime.prototype.dayOfYear</h1>
      <p>
        `Temporal.PlainDateTime.prototype.dayOfYear` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDayOfYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.weekofyear">
      <h1>get Temporal.PlainDateTime.prototype.weekOfYear</h1>
      <p>
        `Temporal.PlainDateTime.prototype.weekOfYear` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarWeekOfYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.daysinweek">
      <h1>get Temporal.PlainDateTime.prototype.daysInWeek</h1>
      <p>
        `Temporal.PlainDateTime.prototype.daysInWeek` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDaysInWeek(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.daysinmonth">
      <h1>get Temporal.PlainDateTime.prototype.daysInMonth</h1>
      <p>
        `Temporal.PlainDateTime.prototype.daysInMonth` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDaysInMonth(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.daysinyear">
      <h1>get Temporal.PlainDateTime.prototype.daysInYear</h1>
      <p>
        `Temporal.PlainDateTime.prototype.daysInYear` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarDaysInYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.monthsinyear">
      <h1>get Temporal.PlainDateTime.prototype.monthsInYear</h1>
      <p>
        `Temporal.PlainDateTime.prototype.monthsInYear` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarMonthsInYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-get-temporal.plaindatetime.prototype.inleapyear">
      <h1>get Temporal.PlainDateTime.prototype.inLeapYear</h1>
      <p>
        `Temporal.PlainDateTime.prototype.inLeapYear` is an accessor property whose set accessor function is *undefined*.
        Its get accessor function performs the following steps:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Return ? CalendarInLeapYear(_calendar_, _dateTime_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.with">
      <h1>Temporal.PlainDateTime.prototype.with ( _temporalDateTimeLike_ [ , _options_ ] )</h1>
      <p>
        The `with` method takes two arguments, _temporalDateTimeLike_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. If Type(_temporalDateTimeLike_) is not Object, then
          1. Throw a *TypeError* exception.
        1. Perform ? RejectTemporalCalendarType(_temporalDateTimeLike_).
        1. Let _calendarProperty_ be ? Get(_temporalDateTimeLike_, *"calendar"*).
        1. If _calendarProperty_ is not *undefined*, then
          1. Throw a *TypeError* exception.
        1. Let _timeZoneProperty_ be ? Get(_temporalDateTimeLike_, *"timeZone"*).
        1. If _timeZoneProperty_ is not *undefined*, then
          1. Throw a *TypeError* exception.
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"hour"*, *"microsecond"*, *"millisecond"*, *"minute"*, *"month"*, *"monthCode"*, *"nanosecond"*, *"second"*, *"year"* »).
        1. Let _partialDateTime_ be ? PreparePartialTemporalFields(_temporalDateTimeLike_, _fieldNames_).
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _fields_ be ? PrepareTemporalFields(_dateTime_, _fieldNames_, «»).
        1. Set _fields_ to ? CalendarMergeFields(_calendar_, _fields_, _partialDateTime_).
        1. Set _fields_ to ? PrepareTemporalFields(_fields_, _fieldNames_, «»).
        1. Let _result_ be ? InterpretTemporalDateTimeFields(_calendar_, _fields_, _options_).
        1. Assert: ! IsValidISODate(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]) is *true*.
        1. Assert: ! IsValidTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]) is *true*.
        1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _calendar_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.withplaintime">
      <h1>Temporal.PlainDateTime.prototype.withPlainTime ( [ _plainTimeLike_ ] )</h1>
      <p>
        The `withPlainTime` method takes one argument _plainTimeLike_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _temporalDateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_temporalDateTime_, [[InitializedTemporalDateTime]]).
        1. If _plainTimeLike_ is *undefined*, then
          1. Return ? CreateTemporalDateTime(_temporalDateTime_.[[ISOYear]], _temporalDateTime_.[[ISOMonth]], _temporalDateTime_.[[ISODay]], 0, 0, 0, 0, 0, 0, _temporalDateTime_.[[Calendar]]).
        1. Let _plainTime_ be ? ToTemporalTime(_plainTimeLike_).
        1. Return ? CreateTemporalDateTime(_temporalDateTime_.[[ISOYear]], _temporalDateTime_.[[ISOMonth]], _temporalDateTime_.[[ISODay]], _plainTime_.[[ISOHour]], _plainTime_.[[ISOMinute]], _plainTime_.[[ISOSecond]], _plainTime_.[[ISOMillisecond]], _plainTime_.[[ISOMicrosecond]], _plainTime_.[[ISONanosecond]], _temporalDateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.withplaindate">
      <h1>Temporal.PlainDateTime.prototype.withPlainDate ( _plainDateLike_ )</h1>
      <p>
        The `withPlainDate` method takes one argument _plainDateLike_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _temporalDateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_temporalDateTime_, [[InitializedTemporalDateTime]]).
        1. Let _plainDate_ be ? ToTemporalDate(_plainDateLike_).
        1. Let _calendar_ be ? ConsolidateCalendars(_temporalDateTime_.[[Calendar]], _plainDate_.[[Calendar]]).
        1. Return ? CreateTemporalDateTime(_plainDate_.[[ISOYear]], _plainDate_.[[ISOMonth]], _plainDate_.[[ISODay]], _temporalDateTime_.[[ISOHour]], _temporalDateTime_.[[ISOMinute]], _temporalDateTime_.[[ISOSecond]], _temporalDateTime_.[[ISOMillisecond]], _temporalDateTime_.[[ISOMicrosecond]], _temporalDateTime_.[[ISONanosecond]], _calendar_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.withcalendar">
      <h1>Temporal.PlainDateTime.prototype.withCalendar ( _calendar_ )</h1>
      <p>
        The `withCalendar` method takes one argument _calendar_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _temporalDateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_temporalDateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be ? ToTemporalCalendar(_calendar_).
        1. Return ? CreateTemporalDateTime(_temporalDateTime_.[[ISOYear]], _temporalDateTime_.[[ISOMonth]], _temporalDateTime_.[[ISODay]], _temporalDateTime_.[[ISOHour]], _temporalDateTime_.[[ISOMinute]], _temporalDateTime_.[[ISOSecond]], _temporalDateTime_.[[ISOMillisecond]], _temporalDateTime_.[[ISOMicrosecond]], _temporalDateTime_.[[ISONanosecond]], _calendar_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.add">
      <h1>Temporal.PlainDateTime.prototype.add ( _temporalDurationLike_ [ , _options_ ] )</h1>
      <p>
        The `add` method takes two arguments, _temporalDurationLike_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _duration_ be ? ToLimitedTemporalDuration(_temporalDurationLike_, « »).
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _result_ be ? AddDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], _duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _duration_.[[Days]], _duration_.[[Hours]], _duration_.[[Minutes]], _duration_.[[Seconds]], _duration_.[[Milliseconds]], _duration_.[[Microseconds]], _duration_.[[Nanoseconds]], _options_).
        1. Assert: ! IsValidISODate(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]) is *true*.
        1. Assert: ! IsValidTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]) is *true*.
        1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.subtract">
      <h1>Temporal.PlainDateTime.prototype.subtract ( _temporalDurationLike_ [ , _options_ ] )</h1>
      <p>
        The `subtract` method takes two arguments, _temporalDurationLike_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _duration_ be ? ToLimitedTemporalDuration(_temporalDurationLike_, « »).
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _result_ be ? AddDateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], −_duration_.[[Years]], −_duration_.[[Months]], −_duration_.[[Weeks]], −_duration_.[[Days]], −_duration_.[[Hours]], −_duration_.[[Minutes]], −_duration_.[[Seconds]], −_duration_.[[Milliseconds]], −_duration_.[[Microseconds]], −_duration_.[[Nanoseconds]], _options_).
        1. Assert: ! IsValidISODate(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]) is *true*.
        1. Assert: ! IsValidTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]) is *true*.
        1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.until">
      <h1>Temporal.PlainDateTime.prototype.until ( _other_ [ , _options_ ] )</h1>
      <p>
        The `until` method takes two arguments, _other_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Set _other_ to ? ToTemporalDateTime(_other_).
        1. If ? CalendarEquals(_dateTime_.[[Calendar]], _other_.[[Calendar]]) is *false*, throw a *RangeError* exception.
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _smallestUnit_ be ? ToSmallestTemporalUnit(_options_, « », *"nanosecond"*).
        1. Let _defaultLargestUnit_ be ! LargerOfTwoTemporalUnits(*"day"*, _smallestUnit_).
        1. Let _largestUnit_ be ? ToLargestTemporalUnit(_options_, « », *"auto"*, _defaultLargestUnit_).
        1. Perform ? ValidateTemporalUnitRange(_largestUnit_, _smallestUnit_).
        1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*).
        1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_).
        1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*).
        1. Let _diff_ be ? DifferenceISODateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _other_.[[ISOYear]], _other_.[[ISOMonth]], _other_.[[ISODay]], _other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]], _dateTime_.[[Calendar]], _largestUnit_, _options_).
        1. Let _roundResult_ be ? RoundDuration(_diff_.[[Years]], _diff_.[[Months]], _diff_.[[Weeks]], _diff_.[[Days]], _diff_.[[Hours]], _diff_.[[Minutes]], _diff_.[[Seconds]], _diff_.[[Milliseconds]], _diff_.[[Microseconds]], _diff_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_, _dateTime_).
        1. Let _result_ be ! BalanceDuration(_roundResult_.[[Days]], _roundResult_.[[Hours]], _roundResult_.[[Minutes]], _roundResult_.[[Seconds]], _roundResult_.[[Milliseconds]], _roundResult_.[[Microseconds]], _roundResult_.[[Nanoseconds]], _largestUnit_).
        1. Return ? CreateTemporalDuration(_roundResult_.[[Years]], _roundResult_.[[Months]], _roundResult_.[[Weeks]], _result_.[[Days]], _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.since">
      <h1>Temporal.PlainDateTime.prototype.since ( _other_ [ , _options_ ] )</h1>
      <p>
        The `since` method takes two arguments, _other_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Set _other_ to ? ToTemporalDateTime(_other_).
        1. If ? CalendarEquals(_dateTime_.[[Calendar]], _other_.[[Calendar]]) is *false*, throw a *RangeError* exception.
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _smallestUnit_ be ? ToSmallestTemporalUnit(_options_, « », *"nanosecond"*).
        1. Let _defaultLargestUnit_ be ! LargerOfTwoTemporalUnits(*"day"*, _smallestUnit_).
        1. Let _largestUnit_ be ? ToLargestTemporalUnit(_options_, « », *"auto"*, _defaultLargestUnit_).
        1. Perform ? ValidateTemporalUnitRange(_largestUnit_, _smallestUnit_).
        1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*).
        1. Set _roundingMode_ to ! NegateTemporalRoundingMode(_roundingMode_).
        1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_).
        1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*).
        1. Let _diff_ be ? DifferenceISODateTime(_other_.[[ISOYear]], _other_.[[ISOMonth]], _other_.[[ISODay]], _other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]], _dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], _largestUnit_, _options_).
        1. Let _roundResult_ be ? RoundDuration(−_diff_.[[Years]], −_diff_.[[Months]], −_diff_.[[Weeks]], −_diff_.[[Days]], −_diff_.[[Hours]], −_diff_.[[Minutes]], −_diff_.[[Seconds]], −_diff_.[[Milliseconds]], −_diff_.[[Microseconds]], −_diff_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_, _dateTime_).
        1. Let _result_ be ! BalanceDuration(−_roundResult_.[[Days]], −_roundResult_.[[Hours]], −_roundResult_.[[Minutes]], −_roundResult_.[[Seconds]], −_roundResult_.[[Milliseconds]], −_roundResult_.[[Microseconds]], −_roundResult_.[[Nanoseconds]], _largestUnit_).
        1. Return ? CreateTemporalDuration(−_roundResult_.[[Years]], −_roundResult_.[[Months]], −_roundResult_.[[Weeks]], _result_.[[Days]], _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.round">
      <h1>Temporal.PlainDateTime.prototype.round ( _options_ )</h1>
      <p>
        The `round` method takes one argument _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. If _options_ is *undefined*, then
          1. Throw a *TypeError* exception.
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _smallestUnit_ be ? ToSmallestTemporalUnit(_options_, « *"year"*, *"month"*, *"week"* », *undefined*).
        1. If _smallestUnit_ is *undefined*, throw a *RangeError* exception.
        1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"halfExpand"*).
        1. Let _roundingIncrement_ be ? ToTemporalDateTimeRoundingIncrement(_options_, _smallestUnit_).
        1. Let _result_ be ! RoundISODateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _roundingIncrement_, _smallestUnit_, _roundingMode_).
        1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.equals">
      <h1>Temporal.PlainDateTime.prototype.equals ( _other_ )</h1>
      <p>
        The `equals` method takes one argument _other_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Set _other_ to ? ToTemporalDateTime(_other_).
        1. Let _result_ be ! CompareISODateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _other_.[[ISOYear]], _other_.[[ISOMonth]], _other_.[[ISODay]], _other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]]).
        1. If _result_ is not 0, return *false*.
        1. Return ? CalendarEquals(_dateTime_.[[Calendar]], _other_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.tostring">
      <h1>Temporal.PlainDateTime.prototype.toString ( [ _options_ ] )</h1>
      <p>
        The `toString` method takes one argument _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _precision_ be ? ToSecondsStringPrecision(_options_).
        1. Let _roundingMode_ be ? ToTemporalRoundingMode(_options_, *"trunc"*).
        1. Let _showCalendar_ be ? ToShowCalendarOption(_options_).
        1. Let _result_ be ! RoundISODateTime(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_).
        1. Return ? TemporalDateTimeToString(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _dateTime_.[[Calendar]], _precision_.[[Precision]], _showCalendar_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.tolocalestring">
      <h1>Temporal.PlainDateTime.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )</h1>
      <p>
        An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `Temporal.PlainDateTime.prototype.toLocaleString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleString` method is used.
      </p>
      <p>
        The `toLocaleString` method takes two arguments, _locales_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.tojson">
      <h1>Temporal.PlainDateTime.prototype.toJSON ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return ? TemporalDateTimeToString(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]], _dateTime_.[[Calendar]], *"auto"*, *"auto"*).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.valueof">
      <h1>Temporal.PlainDateTime.prototype.valueOf ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Throw a *TypeError* exception.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.tozoneddatetime">
      <h1>Temporal.PlainDateTime.prototype.toZonedDateTime ( _temporalTimeZoneLike_ [ , _options_ ] )</h1>
      <p>
        The `toZonedDateTime` method takes two arguments, _temporalTimeZoneLike_ and _options_.
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _timeZone_ be ? ToTemporalTimeZone(_temporalTimeZoneLike_).
        1. Set _options_ to ? GetOptionsObject(_options_).
        1. Let _disambiguation_ be ? ToTemporalDisambiguation(_options_).
        1. Let _instant_ be ? BuiltinTimeZoneGetInstantFor(_timeZone_, _dateTime_, _disambiguation_).
        1. Return ? CreateTemporalZonedDateTime(_instant_.[[Nanoseconds]], _timeZone_, _dateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.toplaindate">
      <h1>Temporal.PlainDateTime.prototype.toPlainDate ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return ? CreateTemporalDate(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Calendar]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.toplainyearmonth">
      <h1>Temporal.PlainDateTime.prototype.toPlainYearMonth ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"monthCode"*, *"year"* »).
        1. Let _fields_ be ? PrepareTemporalFields(_dateTime_, _fieldNames_, «»).
        1. Return ? YearMonthFromFields(_calendar_, _fields_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.toplainmonthday">
      <h1>Temporal.PlainDateTime.prototype.toPlainMonthDay ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _calendar_ be _dateTime_.[[Calendar]].
        1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"monthCode"* »).
        1. Let _fields_ be ? PrepareTemporalFields(_dateTime_, _fieldNames_, «»).
        1. Return ? MonthDayFromFields(_calendar_, _fields_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.toplaintime">
      <h1>Temporal.PlainDateTime.prototype.toPlainTime ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Return ? CreateTemporalTime(_dateTime_.[[ISOHour]], _dateTime_.[[ISOMinute]], _dateTime_.[[ISOSecond]], _dateTime_.[[ISOMillisecond]], _dateTime_.[[ISOMicrosecond]], _dateTime_.[[ISONanosecond]]).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal.plaindatetime.prototype.getisofields">
      <h1>Temporal.PlainDateTime.prototype.getISOFields ( )</h1>
      <p>
        The following steps are taken:
      </p>
      <emu-alg>
        1. Let _dateTime_ be the *this* value.
        1. Perform ? RequireInternalSlot(_dateTime_, [[InitializedTemporalDateTime]]).
        1. Let _fields_ be ! OrdinaryObjectCreate(%Object.prototype%).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"calendar"*, _dateTime_.[[Calendar]]).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoDay"*, 𝔽(_dateTime_.[[ISODay]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoHour"*, 𝔽(_dateTime_.[[ISOHour]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMicrosecond"*, 𝔽(_dateTime_.[[ISOMicrosecond]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMillisecond"*, 𝔽(_dateTime_.[[ISOMillisecond]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMinute"*, 𝔽(_dateTime_.[[ISOMinute]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoMonth"*, 𝔽(_dateTime_.[[ISOMonth]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoNanosecond"*, 𝔽(_dateTime_.[[ISONanosecond]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoSecond"*, 𝔽(_dateTime_.[[ISOSecond]])).
        1. Perform ! CreateDataPropertyOrThrow(_fields_, *"isoYear"*, 𝔽(_dateTime_.[[ISOYear]])).
        1. Return _fields_.
      </emu-alg>
    </emu-clause>
  </emu-clause>

  <emu-clause id="sec-properties-of-temporal-plaindatetime-instances">
    <h1>Properties of Temporal.PlainDateTime Instances</h1>
    <p>
      Temporal.PlainDateTime instances are ordinary objects that inherit properties from the %Temporal.PlainDateTime.prototype% intrinsic object.
      Temporal.PlainDateTime instances are initially created with the internal slots described in <emu-xref href="#table-internal-slots-of-temporaldatetime-instances"></emu-xref>.
    </p>
    <emu-table id="table-internal-slots-of-temporaldatetime-instances" caption="Internal Slots of Temporal.PlainDateTime Instances">
      <table>
        <tbody>
          <tr>
            <th>
              Internal Slot
            </th>
            <th>
              Description
            </th>
          </tr>
          <tr>
            <td>
              [[InitializedTemporalDateTime]]
            </td>
            <td>
              The only specified use of this slot is for distinguishing Temporal.PlainDateTime instances from other objects.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOYear]]
            </td>
            <td>
              An integer representing the year in the ISO 8601 calendar.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOMonth]]
            </td>
            <td>
              An integer between 1 and 12, inclusive, representing the month of the year in the ISO 8601 calendar.
            </td>
          </tr>
          <tr>
            <td>
              [[ISODay]]
            </td>
            <td>
              An integer between 1 and ISODaysInMonth([[ISOYear]], [[ISOMonth]]), inclusive, representing the day of the month in the ISO 8601 calendar.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOHour]]
            </td>
            <td>
              An integer between 0 and 23, inclusive, representing the hour of the day.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOMinute]]
            </td>
            <td>
              An integer between 0 and 59, inclusive, representing the minute of the hour.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOSecond]]
            </td>
            <td>
              An integer between 0 and 59, inclusive, representing the second within the minute.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOMillisecond]]
            </td>
            <td>
              An integer between 0 and 999, inclusive, representing the millisecond within the second.
            </td>
          </tr>
          <tr>
            <td>
              [[ISOMicrosecond]]
            </td>
            <td>
              An integer between 0 and 999, inclusive, representing the microsecond within the millisecond.
            </td>
          </tr>
          <tr>
            <td>
              [[ISONanosecond]]
            </td>
            <td>
              An integer between 0 and 999, inclusive, representing the nanosecond within the microsecond.
            </td>
          </tr>
          <tr>
            <td>
              [[Calendar]]
            </td>
            <td>
              An Object representing the calendar.
            </td>
          </tr>
        </tbody>
      </table>
    </emu-table>
  </emu-clause>

  <emu-clause id="sec-temporal-plaindatetime-abstract-ops">
    <h1>Abstract operations</h1>

    <emu-clause id="sec-temporal-getepochfromisoparts" aoid="GetEpochFromISOParts">
      <h1>GetEpochFromISOParts ( _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_ )</h1>
      <emu-alg>
        1. Assert: _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Assert: ! IsValidISODate(_year_, _month_, _day_) is *true*.
        1. Assert: ! IsValidTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *true*.
        1. Let _date_ be ! MakeDay(𝔽(_year_), 𝔽(_month_ − 1), 𝔽(_day_)).
        1. Let _time_ be ! MakeTime(𝔽(_hour_), 𝔽(_minute_), 𝔽(_second_), 𝔽(_millisecond_)).
        1. Let _ms_ be ! MakeDate(_date_, _time_).
        1. Assert: _ms_ is finite.
        1. Return ℝ(_ms_) × 10<sup>6</sup> + _microsecond_ × 10<sup>3</sup> + _nanosecond_.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-isodatetimewithinlimits" aoid="ISODateTimeWithinLimits">
      <h1>ISODateTimeWithinLimits ( _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_ )</h1>
      <emu-note>
        <p>
          Temporal.PlainDateTime objects can represent points in time within 24 hours (8.64 × 10<sup>16</sup> nanoseconds) of the Temporal.Instant boundaries.
          This ensures that a Temporal.Instant object can be converted into a Temporal.PlainDateTime object using any time zone.
        </p>
      </emu-note>
      <emu-alg>
        1. Assert: _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Let _ns_ be ! GetEpochFromISOParts(_year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_).
        1. If _ns_ ≤ -8.64 × 10<sup>21</sup> - 8.64 × 10<sup>16</sup>, then
          1. Return *false*.
        1. If _ns_ ≥ 8.64 × 10<sup>21</sup> + 8.64 × 10<sup>16</sup>, then
          1. Return *false*.
        1. Return *true*.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-interprettemporaldatetimefields" aoid="InterpretTemporalDateTimeFields">
      <h1>InterpretTemporalDateTimeFields ( _calendar_, _fields_, _options_ )</h1>
      <p>
        The abstract operation InterpretTemporalDateTimeFields interprets the date/time fields in the object _fields_ using the given _calendar_, and returns a Record with the fields according to the ISO calendar.
      </p>
      <emu-alg>
        1. Let _timeResult_ be ? ToTemporalTimeRecord(_fields_).
        1. Let _temporalDate_ be ? DateFromFields(_calendar_, _fields_, _options_).
        1. Let _overflow_ be ? ToTemporalOverflow(_options_).
        1. Let _timeResult_ be ? RegulateTime(_timeResult_.[[Hour]], _timeResult_.[[Minute]], _timeResult_.[[Second]], _timeResult_.[[Millisecond]], _timeResult_.[[Microsecond]], _timeResult_.[[Nanosecond]], _overflow_).
        1. Return the new Record {
          [[Year]]: _temporalDate_.[[ISOYear]],
          [[Month]]: _temporalDate_.[[ISOMonth]],
          [[Day]]: _temporalDate_.[[ISODay]],
          [[Hour]]: _timeResult_.[[Hour]],
          [[Minute]]: _timeResult_.[[Minute]],
          [[Second]]: _timeResult_.[[Second]],
          [[Millisecond]]: _timeResult_.[[Millisecond]],
          [[Microsecond]]: _timeResult_.[[Microsecond]],
          [[Nanosecond]]: _timeResult_.[[Nanosecond]]
          }.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-totemporaldatetime" aoid="ToTemporalDateTime">
      <h1>ToTemporalDateTime ( _item_ [ , _options_ ] )</h1>
      <p>
        The abstract operation ToTemporalDateTime returns its argument _item_ if it is already a Temporal.PlainDateTime instance, converts _item_ to a new Temporal.PlainDateTime instance if possible, and throws otherwise.
      </p>
      <emu-alg>
        1. If _options_ is not present, set _options_ to ! OrdinaryObjectCreate(*null*).
        1. If Type(_item_) is Object, then
          1. If _item_ has an [[InitializedTemporalDateTime]] internal slot, then
            1. Return _item_.
          1. If _item_ has an [[InitializedTemporalZonedDateTime]] internal slot, then
            1. Let _instant_ be ! CreateTemporalInstant(_item_.[[Nanoseconds]]).
            1. Return ? BuiltinTimeZoneGetPlainDateTimeFor(_item_.[[TimeZone]], _instant_, _item_.[[Calendar]]).
          1. If _item_ has an [[InitializedTemporalDate]] internal slot, then
            1. Return ? CreateTemporalDateTime(_item_.[[ISOYear]], _item_.[[ISOMonth]], _item_.[[ISODay]], 0, 0, 0, 0, 0, 0, _item_.[[Calendar]]).
          1. Let _calendar_ be ? GetTemporalCalendarWithISODefault(_item_).
          1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"day"*, *"hour"*, *"microsecond"*, *"millisecond"*, *"minute"*, *"month"*, *"monthCode"*, *"nanosecond"*, *"second"*, *"year"* »).
          1. Let _fields_ be ? PrepareTemporalFields(_item_, _fieldNames_, «»).
          1. Let _result_ be ? InterpretTemporalDateTimeFields(_calendar_, _fields_, _options_).
        1. Else,
          1. Perform ? ToTemporalOverflow(_options_).
          1. Let _string_ be ? ToString(_item_).
          1. Let _result_ be ? ParseTemporalDateTimeString(_string_).
          1. Assert: ! IsValidISODate(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]) is *true*.
          1. Assert: ! IsValidTime(_result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]]) is *true*.
          1. Let _calendar_ be ? ToTemporalCalendarWithISODefault(_result_.[[Calendar]]).
        1. Return ? CreateTemporalDateTime(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]], _result_.[[Hour]], _result_.[[Minute]], _result_.[[Second]], _result_.[[Millisecond]], _result_.[[Microsecond]], _result_.[[Nanosecond]], _calendar_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-balanceisodatetime" aoid="BalanceISODateTime">
      <h1>BalanceISODateTime ( _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_ )</h1>
      <emu-alg>
        1. Assert: _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Let _balancedTime_ be ! BalanceTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_).
        1. Let _balancedDate_ be ! BalanceISODate(_year_, _month_, _day_ + _balancedTime_.[[Days]]).
        1. Return the Record {
            [[Year]]: _balancedDate_.[[Year]],
            [[Month]]: _balancedDate_.[[Month]],
            [[Day]]: _balancedDate_.[[Day]],
            [[Hour]]: _balancedTime_.[[Hour]],
            [[Minute]]: _balancedTime_.[[Minute]],
            [[Second]]: _balancedTime_.[[Second]],
            [[Millisecond]]: _balancedTime_.[[Millisecond]],
            [[Microsecond]]: _balancedTime_.[[Microsecond]],
            [[Nanosecond]]: _balancedTime_.[[Nanosecond]]
          }.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-createtemporaldatetime" aoid="CreateTemporalDateTime">
      <h1>CreateTemporalDateTime ( _isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _calendar_ [ , _newTarget_ ] )</h1>
      <emu-alg>
        1. Assert: _isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Assert: Type(_calendar_) is Object.
        1. If ! IsValidISODate(_isoYear_, _isoMonth_, _isoDay_) is *false*, throw a *RangeError* exception.
        1. If ! IsValidTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *false*, throw a *RangeError* exception.
        1. If ! ISODateTimeWithinLimits(_isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *false*, then
          1. Throw a *RangeError* exception.
        1. If _newTarget_ is not present, set it to %Temporal.PlainDateTime%.
        1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.PlainDateTime.prototype%"*, « [[InitializedTemporalDateTime]], [[ISOYear]], [[ISOMonth]], [[ISODay]], [[ISOHour]], [[ISOMinute]], [[ISOSecond]], [[ISOMillisecond]], [[ISOMicrosecond]], [[ISONanosecond]], [[Calendar]] »).
        1. Set _object_.[[ISOYear]] to _isoYear_.
        1. Set _object_.[[ISOMonth]] to _isoMonth_.
        1. Set _object_.[[ISODay]] to _isoDay_.
        1. Set _object_.[[ISOHour]] to _hour_.
        1. Set _object_.[[ISOMinute]] to _minute_.
        1. Set _object_.[[ISOSecond]] to _second_.
        1. Set _object_.[[ISOMillisecond]] to _millisecond_.
        1. Set _object_.[[ISOMicrosecond]] to _microsecond_.
        1. Set _object_.[[ISONanosecond]] to _nanosecond_.
        1. Set _object_.[[Calendar]] to _calendar_.
        1. Return _object_.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-temporaldatetimetostring" aoid="TemporalDateTimeToString">
      <h1>TemporalDateTimeToString ( _isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _calendar_, _precision_, _showCalendar_ )</h1>
      <emu-alg>
        1. Assert: _isoYear_, _isoMonth_, _isoDay_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Let _year_ be ! PadISOYear(_isoYear_).
        1. Let _month_ be _isoMonth_ formatted as a two-digit decimal number, padded to the left with a zero if necessary.
        1. Let _day_ be _isoDay_ formatted as a two-digit decimal number, padded to the left with a zero if necessary.
        1. Let _hour_ be _hour_ formatted as a two-digit decimal number, padded to the left with a zero if necessary.
        1. Let _minute_ be _minute_ formatted as a two-digit decimal number, padded to the left with a zero if necessary.
        1. Let _seconds_ be ! FormatSecondsStringPart(_second_, _millisecond_, _microsecond_, _nanosecond_, _precision_).
        1. Let _calendarID_ be ? ToString(_calendar_).
        1. Let _calendarString_ be ! FormatCalendarAnnotation(_calendarID_, _showCalendar_).
        1. Return the string-concatenation of _year_, the code unit 0x002D (HYPHEN-MINUS), _month_, the code unit 0x002D (HYPHEN-MINUS), _day_, 0x0054 (LATIN CAPITAL LETTER T), _hour_, the code unit 0x003A (COLON), _minute_, _seconds_, and _calendarString_.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-compareisodatetime" aoid="CompareISODateTime">
      <h1>CompareISODateTime ( _y1_, _mon1_, _d1_, _h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _y2_, _mon2_, _d2_, _h2_, _min2_, _s2_, _ms2_, _mus2_, _ns2_ )</h1>
      <emu-alg>
        1. Assert: _y1_, _mon1_, _d1_, _h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _y2_, _mon2_, _d2_, _h2_, _min2_, _s2_, _ms2_, _mus2_, and _ns2_ are integers.
        1. Let _dateResult_ be ! CompareISODate(_y1_, _mon1_, _d1_, _y2_, _mon2_, _d2_).
        1. If _dateResult_ is not 0, then
          1. Return _dateResult_.
        1. Return ! CompareTemporalTime(_h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _h2_, _min2_, _s2_, _ms2_, _mus2_, _ns2_).
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-adddatetime" aoid="AddDateTime">
      <h1>AddDateTime ( _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _calendar_, _years_, _months_, _weeks_, _days_, _hours_, _minutes_, _seconds_, _milliseconds_, _microseconds_, _nanoseconds_, _options_ )</h1>
      <p>
        The abstract operation AddDateTime adds a duration to a combined date and time, according to the reckoning of the given _calendar_.
      </p>
      <emu-alg>
        1. Assert: _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. Let _timeResult_ be ! AddTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _hours_, _minutes_, _seconds_, _milliseconds_, _microseconds_, _nanoseconds_).
        1. Let _datePart_ be ? CreateTemporalDate(_year_, _month_, _day_, _calendar_).
        1. Let _dateDuration_ be ? CreateTemporalDuration(_years_, _months_, _weeks_, _days_ + _timeResult_.[[Days]], 0, 0, 0, 0, 0, 0).
        1. Let _addedDate_ be ? CalendarDateAdd(_calendar_, _datePart_, _dateDuration_, _options_).
        1. Return the new Record {
            [[Year]]: _addedDate_.[[ISOYear]],
            [[Month]]: _addedDate_.[[ISOMonth]],
            [[Day]]: _addedDate_.[[ISODay]],
            [[Hour]]: _timeResult_.[[Hour]],
            [[Minute]]: _timeResult_.[[Minute]],
            [[Second]]: _timeResult_.[[Second]],
            [[Millisecond]]: _timeResult_.[[Millisecond]],
            [[Microsecond]]: _timeResult_.[[Microsecond]],
            [[Nanosecond]]: _timeResult_.[[Nanosecond]],
          }.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-roundisodatetime" aoid="RoundISODateTime">
      <h1>RoundISODateTime ( _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _increment_, _unit_, _roundingMode_ [ , _dayLength_ ] )</h1>
      <p>
        The abstract operation RoundISODateTime rounds the time part of a combined date and time, carrying over any excess into the date part.
      </p>
      <emu-alg>
        1. Assert: _year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, and _nanosecond_ are integers.
        1. If _dayLength_ is not present, set _dayLength_ to 8.64 × 10<sup>13</sup>.
        1. Let _roundedTime_ be ! RoundTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _increment_, _unit_, _roundingMode_, _dayLength_).
        1. Let _balanceResult_ be ! BalanceISODate(_year_, _month_, _day_ + _roundedTime_.[[Days]]).
        1. Return the new Record {
            [[Year]]: _balanceResult_.[[Year]],
            [[Month]]: _balanceResult_.[[Month]],
            [[Day]]: _balanceResult_.[[Day]],
            [[Hour]]: _roundedTime_.[[Hour]],
            [[Minute]]: _roundedTime_.[[Minute]],
            [[Second]]: _roundedTime_.[[Second]],
            [[Millisecond]]: _roundedTime_.[[Millisecond]],
            [[Microsecond]]: _roundedTime_.[[Microsecond]],
            [[Nanosecond]]: _roundedTime_.[[Nanosecond]]
          }.
      </emu-alg>
    </emu-clause>

    <emu-clause id="sec-temporal-differenceisodatetime" aoid="DifferenceISODateTime">
      <h1>DifferenceISODateTime ( _y1_, _mon1_, _d1_, _h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _y2_, _mon2_, _d2_, _h2_, _min2_, _s2_, _ms2_, _mus2_, _ns2_, _calendar_, _largestUnit_ [ , _options_ ] )</h1>
      <p>
        The abstract operation DifferenceISODateTime returns a Record with the elapsed duration from a first date and time, until a second date and time, according to the reckoning of the given _calendar_.
        The given date and time units are all in the ISO 8601 calendar.
        The _largestUnit_ and _options_ arguments are used in _calendar_'s `dateUntil` method.
      </p>
      <emu-alg>
        1. Assert: _y1_, _mon1_, _d1_, _h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _y2_, _mon2_, _d2_, _h2_, _min2_, _s2_, _ms2_, _mus2_, and _ns2_ are integers.
        1. If _options_ is not present, set _options_ to ! OrdinaryObjectCreate(*null*).
        1. Let _timeDifference_ be ! DifferenceTime(_h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _h2_, _min2_, _s2_, _ms2_, _mus2_, _ns2_).
        1. Let _timeSign_ be ! DurationSign(0, 0, 0, _timeDifference_.[[Days]], _timeDifference_.[[Hours]], _timeDifference_.[[Minutes]], _timeDifference_.[[Seconds]], _timeDifference_.[[Milliseconds]], _timeDifference_.[[Microseconds]], _timeDifference_.[[Nanoseconds]]).
        1. Let _dateSign_ be ! CompareISODate(_y2_, _mon2_, _d2_, _y1_, _mon1_, _d1_).
        1. Let _balanceResult_ be ! BalanceISODate(_y1_, _mon1_, _d1_ + _timeDifference_.[[Days]]).
        1. If _timeSign_ is -_dateSign_, then
          1. Set _balanceResult_ be ! BalanceISODate(_balanceResult_.[[Year]], _balanceResult_.[[Month]], _balanceResult_.[[Day]] - _timeSign_).
          1. Set _timeDifference_ to ? BalanceDuration(-_timeSign_, _timeDifference_.[[Hours]], _timeDifference_.[[Minutes]], _timeDifference_.[[Seconds]], _timeDifference_.[[Milliseconds]], _timeDifference_.[[Microseconds]], _timeDifference_.[[Nanoseconds]], _largestUnit_).
        1. Let _date1_ be ? CreateTemporalDate(_balanceResult_.[[Year]], _balanceResult_.[[Month]], _balanceResult_.[[Day]], _calendar_).
        1. Let _date2_ be ? CreateTemporalDate(_y2_, _mon2_, _d2_, _calendar_).
        1. Let _dateLargestUnit_ be ! LargerOfTwoTemporalUnits(*"day"*, _largestUnit_).
        1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _dateLargestUnit_).
        1. Let _dateDifference_ be ? CalendarDateUntil(_calendar_, _date1_, _date2_, _untilOptions_).
        1. Return ? BalanceDuration(_dateDifference_.[[Years]], _dateDifference_.[[Months]], _dateDifference_.[[Weeks]], _dateDifference_.[[Days]], _timeDifference_.[[Hours]], _timeDifference_.[[Minutes]], _timeDifference_.[[Seconds]], _timeDifference_.[[Milliseconds]], _timeDifference_.[[Microseconds]], _timeDifference_.[[Nanoseconds]], _largestUnit_).
      </emu-alg>
    </emu-clause>
  </emu-clause>
</emu-clause>
